package com.fcgzs.question.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: ljj
 * @Date: 2021/08/22 9:59
 * @Description:
 */
@Configuration
public class PageConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setOverflow(true);      //如果当前页码大于总页数的时候，默认显示第一页
        paginationInterceptor.setLimit(500);     //
        return paginationInterceptor;
    }
}
